package com.springboot.cloud.sysadmin.organization.entity.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.springboot.cloud.common.web.entity.po.BasePo;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by ZengJian on 2021/2/3 0003 上午 9:22
 */
@ApiModel
@Data
@Builder
@NoArgsConstructor(force=true)
@AllArgsConstructor
@TableName("role")
public class Role extends BasePo {

    private String code;
    private String name;
    private String description;
    private Integer roleSort;
    private Boolean resourceCheckStrictly;
    private Boolean deptCheckStrictly;
    private String dataScope;
    private Boolean enabled;
    @TableField(exist = false)
    private Set<String> resourceIds;

    @TableField(exist = false)
    private Set<String> resources = new HashSet<String>();
    @TableField(exist = false)
    private Set<String> depts = new HashSet<String>();

    @TableLogic
    private String deleted = "N";

}
